package com.pf.publish_subscribe.common;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.stereotype.Component;

/**
 * 订阅者
 */
@Component
public class RedisSubscriber extends MessageListenerAdapter {

    @Override
    public void onMessage(Message message, byte[] pattern) {
        System.out.println(">>>>> RedisSubscriber 监听生产者发送的消息=" + message);
    }
}
